import ReactDOM from 'react-dom'
import './ui/antd/styles/reset.less'
import '@/assets/iconfont/iconfont.less'
import '@/assets/fonts/font.less'
import './ui/antd/styles/common.less'
import '@fortawesome/fontawesome-free/css/all.css'
import '@fortawesome/fontawesome-free/css/v4-shims.css'
import 'amis/lib/themes/cxd.css'
import 'amis/lib/themes/antd.css'
import 'amis/lib/helper.css'
import 'amis/sdk/iconfont.css'
import 'virtual:svg-icons-register'
import App from '@/App'
import appService from '@/core/application/service/appService'
import amisInitialize from '@/components/amis/amisInitialize'

const main = async () => {
	amisInitialize.init()
	// 初始化应用
	await appService.init()
	// react 17 创建，控制台会报错，暂时不影响使用（菜单折叠时不会出现闪烁）
	ReactDOM.render(
		// * react严格模式
		// <React.StrictMode>
		<App />,
		// </React.StrictMode>,
		document.getElementById('root'),
	)
}

main()
